package com.furschina.model;

import javax.persistence.Entity;
import javax.persistence.OneToOne;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import cn.wooshai.core.model.WooshaiGeneratedModel;

@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
public class ArticleRecord extends WooshaiGeneratedModel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1990920922034053960L;
	
	@OneToOne
	private Article article;
	private int views = 1;
	private int diggs = 1;
	private int buries = 0;
	private int comments = 0;

	/**
	 * 
	 */
	public ArticleRecord() {
		super();
	}

	/**
	 * @param article
	 */
	public ArticleRecord(Article article) {
		this.article = article;
	}
	
	/**
	 * @return the comments
	 */
	public int getComments() {
		return comments;
	}

	/**
	 * @param comments the comments to set
	 */
	public void setComments(int comments) {
		this.comments = comments;
	}

	/**
	 * @return the diggs
	 */
	public int getDiggs() {
		return diggs;
	}

	/**
	 * @param diggs the diggs to set
	 */
	public void setDiggs(int diggs) {
		this.diggs = diggs;
	}

	/**
	 * @return the buries
	 */
	public int getBuries() {
		return buries;
	}

	/**
	 * @param buries the buries to set
	 */
	public void setBuries(int buries) {
		this.buries = buries;
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}


	public void setViews(int views) {
		this.views = views;
	}

	public int getViews() {
		return views;
	}
	

}
